/ Assembly List / LJCNetCommon / LJCAssemblyReflect / GetFieldSyntax

Namespace - LJCNetCommon


Parameters
fieldInfo - The FieldInfo object.

Syntax

C#
public String GetFieldSyntax(FieldInfo fieldInfo = null)

Creates and returns the Field syntax string. (E)

Example

C#
using System;
using System.Reflection;
using LJC.Net.Common;

public string RetrieveFieldSyntax(string assemblyFileSpec, string fullTypeName
  , string fieldName)
{
  string retValue = null;

  // These calls are not required if an LJCAssemblyReflect reference is
  // used and the the following set methods have already been executed.
  LJCAssemblyReflect assemblyReflect = new LJCAssemblyReflect();
  assemblyReflect.SetAssembly(assemblyFileSpec);
  assemblyReflect.SetTypeReference(fullTypeName);
  assemblyReflect.SetFieldInfo(fieldName);
    
  retValue = assemblyReflect.GetFieldSyntax();
  return retValue;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.